﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GuanYijia.DoMain
{
    //客户信息表
    public class Customer
    {
        [Key]
        public int customerid {  get; set; }
        [Required]
        [StringLength(25)]
        //客户名称
        public string? customer {  get; set; }
        //联系人
        [StringLength(25)]
        public string? contacts { get; set; }
        //联系电话
        [StringLength(11)]
        public string? phone_num { get; set; }
        //电子邮箱
        [StringLength(50)]
        public string? email { get; set; }
        //备注
        [StringLength(500)]
        public string? description { get; set; }
        //是否系统自带 0==系统 1==非系统
        public bool? isystem { get; set; }
        //类型
        [StringLength(20)]
        public string? type { get; set; }
        //启用  
        public bool enabled { get; set; } = false;
        //预收款
        [Column(TypeName = "decimal(24,6)")]
        public decimal? advance_in { get; set; }
        //期初应收
        [Column(TypeName = "decimal(24,6)")]
        public decimal? begin_need_get { get; set; }
        //期初应收
        [Column(TypeName = "decimal(24,6)")]
        public decimal? begin_need_pay { get; set; }
        //累计应收
        [Column(TypeName = "decimal(24,6)")]
        public decimal? all_need_get { get; set; }
        //累计应付
        [Column(TypeName = "decimal(24,6)")]
        public decimal? all_need_pay { get; set; }
        //传真
        [StringLength(30)]
        public string? fax { get; set; }
        //手机号码
        [StringLength(11)]
        public string? telephone { get; set; }
        //地址
        [StringLength(200)]
        public string? address { get; set; }
        //纳税人识别号
        [StringLength(100)]
        public string? tax_num { get; set; }
        //开户行
        [StringLength(100)]
        public string? bank_name { get; set; }
        //账号
        [StringLength(100)]
        public string? account_number { get; set; }
        //税率
        [Column(TypeName = "decimal(24,6)")]
        public decimal? tax_rate { get; set; }
        //排序
        public int? sort { get; set; }
        //租户id
        public int? tenant_id { get; set; }
        //删除标记，0未删除，1删除，默认0
        public bool? delete_flag { get; set; }
    }
}
